<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ page import="com.chengxiaoxiao.commons.PageUtils" %>
<%@ page import="com.chengxiaoxiao.commons.Page" %>
<%@include file="/commons/header.jsp" %>


<div style="margin-left:210px;margin-top:65px;padding:10px 5px 0 5px;">

    <div style="line-height:26px;height:26px;margin-bottom:10px;">
        <h1 style="float:left;font-size:26px;">当前流通书籍</h1>

        <span class="layui-breadcrumb" style="float:right;font-size:12px;">
                <a href="#">首页</a>
                <a><cite>流通书籍</cite></a>
            </span>
    </div>


    <!--内容-----------------------------开始-------------------------------------------------->
    <div style="clear:both;margin-top:20px;">

    </div>


    <div style="clear:both;"></div>
    <div style="clear:both;margin-top:20px;">


    </div>
    <div style="clear:both;"></div>

    <table class="layui-table" lay-skin="row">
        <thead>
        <tr>
            <th>序号</th>
            <th>书籍名称</th>
            <th>作者</th>
            <th>分类</th>
            <th>借阅人</th>
            <th>借阅人学号</th>
            <th>借阅时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>

        <c:forEach items="${page.records}" var="b" varStatus="vs">
            <tr>
                <td width="7%">${vs.count}</td>
                <td width="15%">${b.book.bookName}</td>
                <td>${b.book.author}</td>
                <td>${b.book.category.name}</td>
                <td>${b.user.realName}</td>
                <td>${b.user.studentNum}</td>
                <td>${b.subTime}</td>

                <td>
                    <button ids="${b.id}" class="layui-btn layui-btn-normal layui-btn-small notice">
                        查看
                    </button>
                </td>

            </tr>
        </c:forEach>


        </tbody>

    </table>
    <div id="page1" style="clear: both; margin-top: 30px;" class="paginator">
        <%
            Page pages = (Page) request.getAttribute("page");
        %>
        <%=PageUtils.ShowPageNavigate(pages)%>
    </div>
    <br/><br/><br/><br/><br/><br/><br/><br/>

    <div id="demo1" style="margin-top:10px;"></div>


    <script type="text/javascript">

        $(function () {
            //查看详细信息
            $('.notice').on('click', function () {
                var item = $(this);
                var ids = item.attr("ids");

                layer.open({
                    type: 2,
                    title: '查看详细信息',
                    maxmin: true,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['1000px', '520px'],
                    content: '${pageContext.request.contextPath}/manager/CircleServlet?op=showborrow&id=' + ids
                });
            });
        });
    </script>

    <script src="${pageContext.request.contextPath}/lib/layui.all.js"></script>


<%@include file="/commons/footer.jsp" %>